package controllers;

import play.Logger;
import play.mvc.Controller;
import ch.bfh.abcm.rems.SensorControllerFactory;
import ch.bfh.abcm.rems.sensors.tinkerforge.TFSensorController;
import controllers.tinkerforge.REMSTFConfig;
import controllers.tinkerforge.REMSTFSensorDataPersister;

public class Application extends Controller {

    public static void index() {
        
        Logger.debug("Index starttet...");
        REMSTFSensorDataPersister dataPersister = new REMSTFSensorDataPersister();
        REMSTFConfig config = new REMSTFConfig(dataPersister);
        TFSensorController sensorController = SensorControllerFactory.getTFSensorController(config);
        sensorController.connectToAvailableSensors();
        
        render();
    }

}